import Mock from 'mockjs'
const list = Mock.mock({
  'list|10': [
    {
      'elecWokeTypes|1-5': [
        {
          'craftId': '@id',
          'craftName': '@name',
          'createTime': '@now',
          'createUserId': '@id',
          'elecGrade|1': [11, 22, 33, 44],
          'integral|0-100': 0,
          'isValid': '',
          'personalId': '@id',
          'updateTime': '@now',
          'updateUserId': '@id',
          'wokeTypeId': '@id',
          'wokeTypeResult|1': [0, 1]
        }
      ],
      'ibbElec|1': [0, 1],
      'mobile': '15639288793',
      'name': '@cname',
      'personalId': '@id'
    }
  ]
})
const datas = Mock.mock({
  'accountId': '@id',
  'accountInfoVo': {
    'balance|1-99999': 1,
    'platformIncome|1-99999': 1,
    'redEnvelopeAmount|1-99999': 1,
    'unbalance|1-99999': 1,
    'unsettledIncomeAmount|1-99999': 1,
    'unsettledPayAmount|1-99999': 1
  },
  'address': '@county(true)',
  'age|18-65': 18,
  'cardNum': '@id',
  'city': '@city',
  'district': '@city',
  'elecPersonal': {
    'accountId': '@id',
    'city': '@city',
    'district': '@city',
    'ibbElec|1': [0, 1],
    'ifCertificate|1': [0, 1],
    'ifVerified|1': [0, 1],
    'ifWorkType|1': [0, 1],
    'lastLat|123.1-10': 1,
    'lastLng|123.1-10': 1,
    'mobile|1': ['15639288793', '1345234443'],
    'name': '@cname',
    'orderAcceptCnt|1-99': 1,
    'personalId': '@id',
    'prderSendCnt|1-999': 1,
    'province': '@city',
    'timeCount|1-24': 1,
    'workDemand': '@word'
  },
  'elecWokeTypes': [
    {
      'craftId': '@id',
      'craftName': '@name',
      'createTime': '@now',
      'createUserId': '@id',
      'elecGrade|1': [11, 22, 33, 44],
      'integral|1-9999': 1,
      'isValid': '',
      'personalId': '@id',
      'updateTime': '@now',
      'updateUserId': '@id',
      'wokeTypeId': '@id',
      'wokeTypeResult|1': [0, 1]
    }
  ],
  'gender|1': [0, 1],
  'ibbWokeTypes': [
    {
      'craftId': '@id',
      'craftName': '@cname',
      'createTime': '@now',
      'createUserId': '@id',
      'elecGrade|1': [11, 22, 33, 44],
      'integral|1-99': 2,
      'isValid': '',
      'personalId': '@id',
      'updateTime': '@now',
      'updateUserId': '@id',
      'wokeTypeId': '@id',
      'wokeTypeResult|1': [0, 1]
    }
  ],
  'mobile': '15639288793',
  'name': '@cname',
  'personalCertificates': [
    {
      'auditOpinions': '@word',
      'cardIds': '@id',
      'certificateId': '@id',
      'certificateName': '@cname',
      'certificateType': [11, 21, 31],
      'createTime': '@now',
      'createUserId': '@id',
      'isValid': '',
      'personalId': '@id',
      'updateTime': '@now',
      'updateUserId': '@id'
    }
  ],
  'personalId': '@id',
  'personalScore': {
    'code1': '实施服务',
    'code2': '异步服务',
    'code3': '批量服务',
    'code4': '批量服务',
    'code5': '批量服务',
    'frequency|1-99': 1,
    'personalId': '@id',
    'value1|1-99': 1,
    'value2|1-99': 1,
    'value3|1-99': 1,
    'value4|1-99': 1,
    'value5|1-99': 1,
    'valueOrderAvg|1-99': 1,
    'valueSum|1-99': 1
  },
  'platformPersonalScore': {
    'code1': '实施服务',
    'code2': '异步服务',
    'code3': '批量服务',
    'code4': '批量服务',
    'code5': '批量服务',
    'frequency': 0,
    'personalId': '',
    'value1|1-99': 1,
    'value2|1-99': 1,
    'value3|1-99': 1,
    'value4|1-99': 1,
    'value5|1-99': 1,
    'valueOrderAvg|1-99': 1,
    'valueSum|1-99': 1
  },
  'province|1-99': '1',
  'redEnvelopeAmount|1-99': '1',
  'regAddress': '@city',
  'regChannel': '@city',
  'regLat|121-1': 1,
  'regLng|121-1': 1,
  'regTime': '@now',
  'userAgnt': '@id'
})
const aasd = Mock.mock({
  'accountInfoVo': {
    'balance|1-99': 1,
    'platformIncome|1-99': 1,
    'redEnvelopeAmount|1-99': 1,
    'unbalance|1-99': 99,
    'unsettledIncomeAmount|1-99': 1,
    'unsettledPayAmount|1-99': 1
  },
  'age|18-60': '18',
  'cardNum': '411481199*****3610',
  'heahUrl': 'https://img2.woyaogexing.com/2019/07/16/61741f1332db42d4961ca0716438f090!400x400.jpeg',
  'ibbElec|1': [0, 1],
  'mobile': '15639288793',
  'name': '@cname',
  'sex|1': [0, 1]
})
const nak = Mock.mock({
  'list|10': [
    {
      'accountId': '@id',
      'cardNum': '411481*******610',
      'ibbElec|1': [0, 1],
      'ifCertificate|1': [0, 1],
      'ifVerified|1': [0, 1],
      'ifWorkType|1': [0, 1],
      'mobile|1': [15639288793, 1383238238233],
      'name': '@cname',
      'personalId': '@id',
      'regAddress': '@city',
      'regChannel': '渠道',
      'regTime': '@now'
    }
  ]
})
const lastLat = Mock.mock({
  'list': [
    {
      'lastLat|1-120': 1,
      'lastLng|1-120': 1
    }
  ]
})
const dictMap = {
  sendMode: {
    2: '111',
    1: '222'
  },
  smsType: {
    1: 'eee',
    2: '3rrr'
  },
  status: {
    2: '222',
    1: 'dddd'
  },
  elecGrade: {
    11: '初级',
    22: '中级',
    33: '高级',
    44: '特级'
  }
}
const pub = {
  isMore: 0,
  pageIndex: 1,
  pageSize: 10,
  startIndex: 0,
  totalNum: 30,
  totalPage: 1
}
export default [
  // 电工管理
  {
    url: '/elec/elec/personal/getElecPersonalListPage',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {
          ...nak,
          ...pub
        },
        dictMap,
        msg: ''
      }
    }
  },
  {
    url: '/elec/elec/personal/getElecDistributionMap',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {
          ...list,
          ...pub
        },
        dictMap,
        msg: ''
      }
    }
  },
  {
    url: '/elec/elec/personal/getElecInfoById',
    type: 'get',
    response: config => {
      return {
        code: 1,
        data: {
          ...datas
        },
        dictMap,
        msg: ''
      }
    }
  },
  {
    url: '/elec/elec/personal/getElecPersonalById',
    type: 'get',
    response: config => {
      return {
        code: 1,
        data: {
          ...aasd
        },
        dictMap,
        msg: ''
      }
    }
  }, {
    url: '/elec/elec/personal/listElecMap',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {
          ...lastLat.list
        },
        dictMap,
        msg: ''
      }
    }
  }, {
    url: '/elec/elec/personal/modifyOrderAcceptCnt',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {},
        dictMap,
        msg: ''
      }
    }
  }, {
    url: '/elec/elec/personal/modifyPrderSendCnt',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {},
        dictMap,
        msg: ''
      }
    }
  }
]
